package cn.cookyfly.dailyreview.client;


import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public class RpcCaller {

	private static RpcServiceAsync rpcCaller;

	public static RpcServiceAsync getCaller() {
		if (rpcCaller == null) {
			initializeRpcCaller();
		}
		return rpcCaller;
	}

	private static void initializeRpcCaller() {
		rpcCaller = GWT.create(RpcService.class);
		((ServiceDefTarget) rpcCaller).setServiceEntryPoint(GWT.getModuleBaseURL() + "RpcService");
	}

}
